#include <stdio.h>
#include <iostream>

using std::cout;
using std::endl;

int val = 100;
int number = 1;//全局变量

namespace wd
{
int number = 10;//命名空间中的实体number

void print(int number)//函数形参number
{
    cout << "形参number = " << number << endl;
    cout << "命名空间中的number = " << wd::number << endl;
    cout << "全局number = " << ::number << endl;//匿名命名空间
    cout << "全局val = " << ::val<< endl;//匿名命名空间
    cout << "全局val = " << val<< endl;//如果没有冲突
    printf("hello,world\n");//没有冲突，是唯一的
    ::printf("hello,world\n");

}

}//end of namespace std

int main(int argc, char *argv[])
{
    int x = 300;
    wd::print(x);

    return 0;
}

